POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 14:20:28 EDT (-0400)
  Re: Function parameter bug  
From: Rune
Date: 27 Oct 2001 05:51:37
Message: <3bda83a9$1@news.povray.org>
"Christoph Hormann" wrote:
> Since it's leagal to use declared variables in functions,

When you *call* functions, not when you initiate them! At least it shouldn't
be since it makes no sense at all.

Take a macro:

#declare V = 0.1:
#macro MyMacro(V) V*2 #end
sphere {x, 0.1}

Here's there's no problem since the parameter in the macro doesn't conflict
with already declared variables. You can still call the macro with the
declared variable and *then* it will be used:

#declare B = MyMacro(V);

But with functions a conflict happens at the time of declaring the function
and that's all wrong.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.